package com.example.douyin.adapter;

import android.widget.ImageView;

import androidx.annotation.NonNull;
import androidx.annotation.Nullable;

import com.bumptech.glide.Glide;
import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.viewholder.BaseViewHolder;
import com.example.douyin.R;
import com.example.lib_base_mvvm.entity.VideoEntity;

import java.util.List;

public class MineVideoAdapter extends BaseQuickAdapter<VideoEntity.DataBean, BaseViewHolder> {
    public MineVideoAdapter(int layoutResId, @Nullable List<VideoEntity.DataBean> data) {
        super(layoutResId, data);
    }

    @Override
    protected void convert(@NonNull BaseViewHolder holder, VideoEntity.DataBean bean) {
        holder.setText(R.id.tv,bean.getCaption());
        ImageView iv = holder.findView(R.id.iv);
        Glide.with(getContext()).load(bean.getVideomainimg()).into(iv);
    }
}
